@mixin text-line($value) {
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: $value;
  /* autoprefixer: off */
  -webkit-box-orient: vertical;
  /* autoprefixer: on */
  word-break: break-all;
}

.home-quick-tool {
  height: 160px;
  .main-box {
    position: relative;
    z-index: 1;
    padding: 20px 0 20px 20px;
    margin-right: 4px;
    display: flex;
    justify-content: space-between;
    .quick-add {
      height: 120px;
      width: calc(100% - 170px);
      .home-title {
        margin-bottom: 12px;
      }
      .quick-btn {
        display: flex;
        justify-content: left;
        .left-btn {
          transition: all ease 0.2s;
          cursor: pointer;
          overflow: hidden;
          position: relative;
          height: 80px;
          width: calc((100% - 50px)/2);
          opacity: 0.75;
          background-image: linear-gradient(180deg, #33ECBA 0%, #3FB889 99%);
          border-radius: 4px;
          margin-right: 20px;
          .bubble {
            position: absolute;
            right: -14px;
            top: -11px;
            width: 160px;
            height: 160px;
            border-radius: 50%;
            opacity: 0.75;
            background-image: linear-gradient(150deg, rgba(255,255,255,0.41) 0%, rgba(255,255,255,0.00) 55%);
          }
          &:hover {
            box-shadow: 0 4px 12px 0 rgba(50, 205, 145,0.50);
          }
        }
        .right-btn {
          transition: all ease 0.2s;
          cursor: pointer;
          overflow: hidden;
          position: relative;
          height: 80px;
          width: calc((100% - 50px)/2);
          background-image: linear-gradient(179deg, #80D8FF 0%, #649DFF 100%);
          border-radius: 4px;
          .bubble {
            position: absolute;
            right: -14px;
            top: -11px;
            width: 160px;
            height: 160px;
            border-radius: 50%;
            opacity: 0.75;
            background-image: linear-gradient(150deg, rgba(255,255,255,0.41) 0%, rgba(255,255,255,0.00) 55%);
          }
          .down-triangle {
            color: #fff;
            position: absolute;
            right: 20px;
            top: 50%;
            transform: translate(0%, -50%);
          }
          &:hover {
            box-shadow: 0 4px 12px 0 rgba(75,141,255,0.50);
          }
        }
        .img-box {
          margin: 14px;
          width: 56px;
          height: 56px;
          .img {
            width: 56px;
            height: 56px;
          }
        }
        .title {
          font-weight: 500;
          font-size: 16px;
          color: #FFFFFF;
          letter-spacing: 0.13px;
          text-align: center;
          line-height: 16px;
          position: absolute;
          left: 50%;
          top: 50%;
          transform: translate(-50%, -50%);
        }
      }
    }
    .recent {
      display: block;
      flex-shrink: 0;
      height: 124px;
      width: 170px;
      border-left: 1px solid #EBF0F5;
      padding-left: 30px;
      overflow: hidden;
      .recent-box {
        height: 120px;
      }
      .recent-title {
        padding-right: 16px;
        @include text-line(1);
        font-size: 14px;
        color: #848C95;
        letter-spacing: 0.1px;
        line-height: 20px;
        padding-bottom: 12px;
      }
      .quick-form-list {
        padding-right: 12px;
        overflow-y: auto;
        overflow-x: hidden;
        height: 91px;
        .item {
          margin-bottom: 8px;
          .form-name {
            cursor: pointer;
            font-size: 14px;
            color: #4E5B71;
            letter-spacing: 0.1px;
            @include text-line(1);
          }
          .position {
            @include text-line(1);
            margin-top: 4px;
            font-size: 12px;
            color: #848C95;
            letter-spacing: 0.1px;
            line-height: 16px;
          }
          &:hover {
            .form-name {
              color: #4B8DFF;
            }
          }
          &:last-child {
            margin-bottom: 0;
          }
        }
        .empty-content {
          width: 140px;
          height: 80px;
          .img-box {
            margin: 14px auto 4px auto;
            width: 32px;
            height: 32px;
            .img {
              user-select: none;
              width: 32px;
              height: 32px;
            }
          }
          .tip {
            text-align: center;
            font-size: 12px;
            color: #B5C0CE;
            line-height: 16px;
          }
        }
        /* 设置滚动条的样式 */
        &::-webkit-scrollbar {
          width: 4px;
        }
        /* 滚动条滑块 */
        &::-webkit-scrollbar-thumb {
          border-radius: 4px;
          background: #D7DCE6;
        }
      }
    }
    .invisible-stations {
      position: absolute;
      z-index: -1;
      opacity: 0;
    }
  }
}

.quick-add-popover {
  max-width: 720px !important;
  .ant-popover-arrow {
    display: none;
  }
  .ant-popover-inner {
    max-height: 332px;
    .ant-popover-inner-content {
      padding: 0;
      max-height: 332px;
      .quick-add-content {
        padding: 12px 0;
        display: flex;
        justify-content: left;
        .single-document {
          width: 180px;

          .img-title-box {
            display: flex;
            padding: 12px 20px;
            .img-box {
              margin-right: 8px;
              width: 20px;
              height: 20px;
              .img {
                user-select: none;
                width: 20px;
                height: 20px;
              }
            }
            .document-title {
              @include text-line(1);
              font-weight: 500;
              font-size: 16px;
              color: #1E2126;
              line-height: 24px;
            }
          }
          .form-list-box {
            max-height: 260px;
            overflow: auto;
            .single-form {
              padding: 0 20px;
              font-size: 14px;
              color: #4E5B71;
              letter-spacing: 0.1px;
              line-height: 32px;
              @include text-line(1);
              &:hover {
                cursor: pointer;
                font-weight: 500;
                color: #1F70FC;
              }
            }
          }
        }
      }
      .quick-add-content-multi {
        padding: 16px 0;
        .quick-add-content-multi-single {
          cursor: pointer;
          transition: all ease 0.2s;
          background-color: #fff;
          width: 260px;
          display: flex;
          padding: 8px 20px;
          .img-box {
            margin-right: 12px;
            width: 24px;
            height: 24px;
            .img {
              user-select: none;
              width: 24px;
              height: 24px;
            }
          }
          .document-title {
            transition: all ease 0.2s;
            @include text-line(1);
            font-size: 14px;
            color: #4E5B71;
            line-height: 24px;
          }
          &:hover {
            background-color: #F2F6FF;
            .document-title {
              color: #1F70FC;
              font-weight: 500;
            }
          }
        }
      }
      .empty-content {
        width: 240px;
        .img-box {
          margin: 14px auto 4px auto;
          width: 32px;
          height: 32px;
          .img {
            user-select: none;
            width: 32px;
            height: 32px;
          }
        }
        .tip {
          text-align: center;
          font-size: 12px;
          color: #B5C0CE;
          line-height: 16px;
          padding-bottom: 16px;
        }
      }
      .loading-box {
        width: 100px;
        height: 100px;
      }
    }
  }
}

@media screen and (max-width: 1300px) {
  .home-quick-tool .main-box {
    padding: 20px;
    margin-right: 0;
    .quick-add {
      width: 100%;
      .quick-btn {
        .left-btn, .right-btn {
          width: calc((100% - 20px)/2);
        }
      }
    }
    .recent {
      display: none;
    }
  }
}
